<template>
  <view class="year-head">
    <view v-for="(item,index) in stage" @click="study(index)" :key="index" class="year-head-context">
      {{stage[index]}}
    </view>
  </view>
</template>
<script>
export default {
  data(){
    return {
      stage:['小学阶段','一年级','二年级','三年级','四年级','五年级','六年级','初中阶段','初一','初二','初三','高中阶段','高一','高二','高三'],
    }
  },
  methods:{
    study(index){
      this.$store.state.stage = this.stage[index]
    }
  }
}
</script>

<style scoped>
  .year-head {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  .year-head-context {
    width: 100%;
    height: 80rpx;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding-left: 30rpx;
  }
  /* .year-head view:nth-child(7){
    border:none;
  } */

</style>